Optimal. Leaf size=53 \[ \frac {1}{2} (2 a c+b d) x-\frac {(b c+a d) \cos (e+f x)}{f}-\frac {b d \cos (e+f x) \sin (e+f x)}{2 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps
used = 1, number of rules used = 1, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.048, Rules used = {2813}
\begin {gather*} -\frac {(a d+b c) \cos (e+f x)}{f}+\frac {1}{2} x (2 a c+b d)-\frac {b d \sin (e+f x) \cos (e+f x)}{2 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2813
Rubi steps
\begin {align*} \int (a+b \sin (e+f x)) (c+d \sin (e+f x)) \, dx &=\frac {1}{2} (2 a c+b d) x-\frac {(b c+a d) \cos (e+f x)}{f}-\frac {b d \cos (e+f x) \sin (e+f x)}{2 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.12, size = 52, normalized size = 0.98 \begin {gather*} \frac {2 b d e+4 a c f x+2 b d f x-4 (b c+a d) \cos (e+f x)-b d \sin (2 (e+f x))}{4 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.09, size = 59, normalized size = 1.11
method | result | size |
risch | \(a c x +\frac {x b d}{2}-\frac {\cos \left (f x +e \right ) a d}{f}-\frac {\cos \left (f x +e \right ) b c}{f}-\frac {b d \sin \left (2 f x +2 e \right )}{4 f}\) | \(53\) |
derivativedivides | \(\frac {b d \left (-\frac {\cos \left (f x +e \right ) \sin \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-a d \cos \left (f x +e \right )-b c \cos \left (f x +e \right )+a c \left (f x +e \right )}{f}\) | \(59\) |
default | \(\frac {b d \left (-\frac {\cos \left (f x +e \right ) \sin \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-a d \cos \left (f x +e \right )-b c \cos \left (f x +e \right )+a c \left (f x +e \right )}{f}\) | \(59\) |
norman | \(\frac {\left (a c +\frac {b d}{2}\right ) x +\left (a c +\frac {b d}{2}\right ) x \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (2 a c +b d \right ) x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\frac {\left (2 a d +2 b c \right ) \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {b d \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {2 \left (a d +b c \right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}-\frac {b d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{2}}\) | \(150\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.32, size = 62, normalized size = 1.17 \begin {gather*} \frac {4 \, {\left (f x + e\right )} a c + {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} b d - 4 \, b c \cos \left (f x + e\right ) - 4 \, a d \cos \left (f x + e\right )}{4 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 51, normalized size = 0.96 \begin {gather*} -\frac {b d \cos \left (f x + e\right ) \sin \left (f x + e\right ) - {\left (2 \, a c + b d\right )} f x + 2 \, {\left (b c + a d\right )} \cos \left (f x + e\right )}{2 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 94 vs.
\(2 (44) = 88\).
time = 0.09, size = 94, normalized size = 1.77 \begin {gather*} \begin {cases} a c x - \frac {a d \cos {\left (e + f x \right )}}{f} - \frac {b c \cos {\left (e + f x \right )}}{f} + \frac {b d x \sin ^{2}{\left (e + f x \right )}}{2} + \frac {b d x \cos ^{2}{\left (e + f x \right )}}{2} - \frac {b d \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} & \text {for}\: f \neq 0 \\x \left (a + b \sin {\left (e \right )}\right ) \left (c + d \sin {\left (e \right )}\right ) & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.45, size = 48, normalized size = 0.91 \begin {gather*} \frac {1}{2} \, {\left (2 \, a c + b d\right )} x - \frac {b d \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} - \frac {{\left (b c + a d\right )} \cos \left (f x + e\right )}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 7.72, size = 52, normalized size = 0.98 \begin {gather*} a\,c\,x+\frac {b\,d\,x}{2}-\frac {a\,d\,\cos \left (e+f\,x\right )}{f}-\frac {b\,c\,\cos \left (e+f\,x\right )}{f}-\frac {b\,d\,\sin \left (2\,e+2\,f\,x\right )}{4\,f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________